{include file="header.html"}
	<link href="{$skins}css/news.css" rel="stylesheet" />
		 
	    
	    <ul class="nav nav-tabs">
	    	<li class="item active"><a href="{$appadmin}?m=news">新鲜事</a></li>
	    	<li class="item"><a href="{$appadmin}?m=news_comment">评论</a></li>
	    	<li class="item"><a href="{$appadmin}?m=news_blacklist">黑名单</a></li>
	    </ul>
	    <div class="main-body">
	    	<form class="search-form" method="get" action="{$appadmin}">
	    		<input type="hidden" name="m" value="news" />
				<input type="text" name="keywords" value="{$smarty.get.keywords|html}" />
				 
				推荐 <input type="checkbox" name="is_recommend" {if get('is_recommend')} checked=""{/if} value="1" />
				排序 <select name="orderby">
					<option value="0">默认</option>
					<option value="1" {if get('orderby') eq 1} selected{/if}>评论</option>
					<option value="2" {if get('orderby') eq 2} selected{/if}>转发</option>
					<option value="3" {if get('orderby') eq 3} selected{/if}>赞</option>
				</select>
				<button class="btn">搜一下</button>
			</form>
	  		<table class="table">
	  			<tr>
	  				<th>内容</th>
	  				<th>转发/评论/赞</th>
	  				<th>推荐</th>
	  				<th>操作</th>
	  			</tr>
	  			{foreach item=c from=$data}
	  			<tr>
	  				<td>
	  					<p>{$c.dateline|date:Y-m-d H:i}.@{$c.nickname}:{$c.content}</p>
	  					 
	  					{if $c.imgsdata}
	  					<div class="js-thumb-item">
	  						{foreach item=p from=$c.imgsdata}
	  						<img width="30" class="js-thumb" v="{$p|images_site}" src="{$p|images_site}.100x100.jpg">
	  						{/foreach}
	  					</div>
	  					{/if}
	  				</td>
	  				<td align="center"  width="160">{$c.spread_num}/{$c.comment_num}/{$c.love_num}</td>
	  				<td align="center" width="50">{if $c.is_recommend eq 1}
   <img src='{$skins}images/yes.gif' class="ajax_no" url='{$appadmin}?m=news&a=recommend&newsid={$c.newsid}&is_recommend=0' rurl='{$appadmin}?m=news&a=recommend&newsid={$c.newsid}&is_recommend=1'>
    {else}
    <img src='{$skins}images/no.gif' class="ajax_yes" url='{$appadmin}?m=news&a=recommend&newsid={$c.newsid}&is_recommend=1' rurl='{$appadmin}?m=news&a=recommend&newsid={$c.newsid}&is_recommend=0'>
    {/if}</td>
	  				<td align="center" width="100">
	  					<a href="javascript:;" class="delete" url="{$appadmin}?m=news&a=delete&ajax=1&newsid={$c.newsid}">删除</a>
	  					<a href="javascript:;" class="js-newsuser-forbid" v-userid="{$c.userid}">禁言</a>
	  				</td>
	  			</tr>
	  			{/foreach}
	  			
	  		</table>
	    	 
	    	<div class="pages">{$pagelist}</div>
	    </div>
	     
   		{include file="inc/js_thumb.html"} 
   		<script>
   			$(".js-newsuser-forbid").click(function(){
   				var obj=$(this);
   				$.get("{$appadmin}?m=news_blacklist&a=forbid&userid="+$(this).attr("v-userid"),function(data){
   					obj.html("已禁言");
   				});
   			})
   		</script>
{include file="footer.html"} 

